Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surgery System/Process Rework (Omnisurgery) (Under New Management) #2826

Closed

Conversation

XxNinMario64xX
Copy link

About The Pull Request

Reworks the current surgery system by combing all surgeries into one large "Omnisurgery" that allows players to move freely between 'layers' of the body, allowing for multiple surgeries to be done in a single instance.

Why It's Good For The Game

Currently, surgeries require tedious amounts of movement between the popup "choose a surgery" UI and forces players to repeatedly do the same steps for each surgery despite them being virtually similar. (EX: Needing to tend wounds in the chest, then needing to cauterize and cut back INTO the chest to repair the bone in it.)

By making the surgery more akin to bay surgery and utilizing radial menu options, surgeries can be done in one instance rather through several instances requiring the same steps every time. It makes no sense how you have to completely close up the body of your patient so you can open them back up to fix their chest, less so if you have to tend wounds and then repeatedly slice through said tended wounds to fix their body.

This also reduces the amount of actions required between surgery steps, making it effectively the same surgery system with popups and inputs thanks to radial menus filling in for surgeries that require the same tool on the same layer. However, we are trying to avoid this redundancy in the first place, so it'd be best to not see the radial menu as an opportunity to add 20 scalpel surgeries to the same layer.

This is still in development.

Changelog

🆑
add: Added "Omnisurgery"
add: Bone Gel and Bone Setter for use in Bone Repair surgery
tweak: I now have full ownership of the branch this draft PR is from
tweak: Makes surgeries that use the same layer and tool accessible via radial menu
code: Added Omnisurgery framework to allow new surgeries to be added to the new system (Len Kagamine)
refactor: Old surgery system now uses a single "Omnisurgery" system; this still uses old surgery code, but restructures it into using said Omnisurgery rather than a bunch of regular surgeries.
/:cl:

V2LenKagamine and others added 27 commits February 26, 2024 20:58
Fixes minor logic error meaning a tool was not itself.
oops again
Now including selectors and auto-redo for repeatables!
Whoops forgot to remove bad code.
Nuke priority, layer now a list, way to complete surgery
also AXE HEALING AXE HEALING AXE HEALING
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

closes #53931, #70916, #53931

Organs were previously stored in nullspace. Now they are stored in their
prospective bodyparts. Bodyparts are now stored in the mob.

I've also had to refactor a lot of code concerning organ movement.
Previously, organs were only moved into bodyparts once the bodyparts
were removed. To accomodate this change, two major distinctions have
been made:

**Bodypart removal/insertion**
Called only when an organ is taken out of a bodypart. Bodypart overlays,
damage modifiers or other changes that should affect a bodypart itself
goes here.

**Mob insertion/removal**
Called when an organ is removed from a mob. This can either be directly,
by taking the organ out of a mob, or by removing the bodypart that
contains the organ. This lets you add and remove organ effects safely
without having to worry about the bodypart.

Now that we controle the movement of bodyparts and organs, we can fuck
around with them more. Summoning someones head or chest or heart will
actually kill them now (and quite violently I must say (chest summoning
gibs lol)).

https://github.com/tgstation/tgstation/assets/7501474/5efc9dd3-cfd5-4ce4-b70f-d0d74894626e

I´ve also added a unit test that violently tears apart and reconstructs
a person in different ways to see if they get put toghether the right
way

This will definitely need a testmerge. I've done a lot of testing to
make sure interactions work, but more niche stuff or my own incompetence
can always slip through.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

A lot of organ work is quite restricted. You can't C4 someones heart,
you cant summon their organs and a lot of exceptions have to be made to
keep organs in nullspace. This lets organs (and bodyparts) play more
nicely with the rest of the game. This also makes it a lot easier to
move away from extorgans since a lot of their unique movement code has
been removed and or generalized.

I don't like making PRs of this size (I'm so sorry reviewers), but I was
in a unique position to replace the entire system in a way I couldn't
have done conveniently in multiple PRs

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:
refactor: Your organs are now inside your body. Please report any issues
with bodypart and organ movement, including exotic organ, on github and
scream at me
fix: Cases of unexpected organ movement, such as teleporting bodyparts
and organs with spells, now invokes a proper reaction (usually violent
death)
runtime: Fixes HARS runtiming on activation/deactivation
fix: Fixes lag when species swapping
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
Fixes minor miscalculations from porting. Did not check all.
ez pz no testing at all
Fixes inability to organ.
Yeeeeeeeeeee boi
Also adds two new layers to the movelayer.dmi
No longer requires an initial incision step. Can simply be accessed on layer 4 with hemostat. Looks much better.
Also disables implant removal temporarily to allow for hemostat to be used as a movelayer tool without redundancies.
It compiles did not test hope it worksws
Makes Advanced Surgery now only require Biotech as well to make up for this adjustment until R&D is successfully nuked from orbit
… role yet)

I'm now officially a c*der.

- Removes Advanced and Experimental surgeries as a means of reducing bloat. Not many people use these, and a lot of these surgeries should be done with other systems. Less means more in the longrun, especially if we want to move away from TG code.
- Makes omnisurgery much easier to complete given we no longer have to worry about researchstuff for omnisurgery and whatnot.
- Give a LOT more room to add new content that fits Shiptest's main theme

- Removes brainwash uplink objective from uplink (not like we're using that anyway)

- Comments out medical research disks from ruin loot
Also made sure omnisurgery can't be done on a limb that no longer exists
@github-actions github-actions bot added DME Edit Code change Watch something violently break. labels Mar 9, 2024
@Geoengi
Copy link
Contributor

Geoengi commented Mar 10, 2024

Are the new surgical tools in the arm surgical toolset implant?

AND PROSTHETICS SURGERY STILL ISN'T FINISHED YET HAHAHA DYING
@XxNinMario64xX
Copy link
Author

@Geoengi Not that I know of. Will have to touch up on that, though I'm unsure of how to primarily shove bone gel into an implant. Bonesetter I can do, though.

@Geoengi
Copy link
Contributor

Geoengi commented Mar 11, 2024

@XxNinMario64xX Inserting a tool into the surgical implant in the code should be like inserting any other tool unless it has a limited number of uses. A surgical implant would ideally have every tool for any standard surgery. In lore, it would be something akin to a bone gel dispenser, maybe?

Includes numerous bug fixes, some unabstraction of surgery_helper file, and actual working limb grafting surgery. This surgery has revealed to me that there is no god and I am not even close to finished.
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the Merge Conflict Use Git Hooks, you're welcome. label Mar 25, 2024
XxNinMario64xX and others added 6 commits April 6, 2024 15:03
This took three weeks god help me
accidentally left that in
Moved chemlist fetching to omni datum
TRYING to get a proc to recover a list of surgeries at the layer the player is currently on but goddamnit it's not working send help
Merges with master and updates surgery display info
@github-actions github-actions bot added TGUI and removed Merge Conflict Use Git Hooks, you're welcome. labels Apr 10, 2024
FalloutFalcon and others added 6 commits April 9, 2024 21:16
@github-actions github-actions bot added the Merge Conflict Use Git Hooks, you're welcome. label Jun 2, 2024
Copy link
Contributor

github-actions bot commented Jun 2, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@rye-rice
Copy link
Member

sowwy, confwix and nwo prwogwess iwn mwonths, rweopwen wwen wrorking on iwt agwian

@rye-rice rye-rice closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break. DME Edit Merge Conflict Use Git Hooks, you're welcome. TGUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants